rm(list = ls())
library(ggplot2)
library(tidyverse)
library(matlab)
devtools::load_all()

# 模为1的复根
hatA <- cbind(-1, 2:1)
b <- matrix(c(1,1),2)
init_x <- matrix(c(0.1,0.2),2)
draw_de(hatA,b)

#
hatA <- cbind(-.1, 2:1)
eigen(hatA)

# 实值不同的根，模大于1，发散
hatA <- matrix(c(1,2,3,4),2)
draw_de(hatA,b)

# 实值不同的根，模小于1
hatA <- matrix(c(.1,.2,.1,.3),2)
draw_de(hatA,b,n = 10, init_x = c(100,2))



